<template>
  <el-container  style="margin-top: 20px;margin-left: 200px">
    <el-aside class="list-control" width="200px">
      <ul >
        <li>
          甄选蔬菜
          <img style="width:150px" src="../infPhotos/veg.jpg">
        </li>
        <li>
          甄选渔产
          <img style="width: 150px" src="../infPhotos/fish.jpg">
        </li>
        <li>
          甄选调料
          <img style="width: 150px" src="../infPhotos/spices.jpg">
        </li>
      </ul>
    </el-aside>
    <el-main>
      <div class="list-control">
      <el-carousel :interval="2500" arrow="always" height="500px" >
        <el-carousel-item v-for="(item,index) in chart" :key="item.id">
          <img :src="item.idView" height=100% width="100%">
        </el-carousel-item>
      </el-carousel>
      </div>
    </el-main>
  </el-container>



</template>

<script>
export default {
  name: "home",
  data(){
    return{
      chart:[{id:0,idView:require('../vegPhotos/辣椒/1.jpg')},
        {id:1,idView:require('../vegPhotos/蒜/1.jpg')},
        {id:2,idView:require('../vegPhotos/土豆/1.jpg')}
        //imagebox是assets下一个放图片的文件夹
      ]
    }
  }
}
</script>

<style scoped>
.el-carousel__item h3 {
  color: #475669;
  font-size: 14px;
  opacity: 0.75;
  line-height: 200px;
  margin: 0;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n+1) {
  background-color: #d3dce6;
}
.list-control{
  width: 800px;
  background: #fff;
  border-radius: 6px;
  margin: 16px;
  padding: 20px;
  box-shadow: 0 1px 1px rgba(0,0,0,.2);
}
.list-control-filter{
  margin-bottom: 16px;
}
.list-control-filter-item,
.list-control-order-item {
  cursor: pointer;
  display: inline-block;
  border: 1px solid #e9eaec;
  border-radius: 4px;
  margin-right: 6px;
  padding: 2px 6px;
}
.list-control-filter-item.on,
.list-control-order-item.on{
  background: #f2352e;
  border: 1px solid #f2352e;
  color: #fff;
}
</style>
